home *** CD-ROM | disk | FTP | other *** search
/ PC Advisor 2006 April / PC Advisor 2006 April.iso / Features / USB / mkbt20 / makeboot.bat < prev    next >
Encoding:
DOS Batch File  |  2001-07-16  |  1.4 KB  |  56 lines

  1. @echo off
  2. rem
  3. rem MAKEBOOT sample batch file for using MKBT
  4. rem Created by Bart Lagerweij -- http://www.nu2.nu/mkbt
  5. rem
  6. if "%1" == "" goto _err1
  7. if not exist %1\bootsect.bin goto _err2
  8. echo.
  9. echo Insert floppy to format in drive A:
  10. echo * Warning! all data on floppy will be erased! *
  11. echo.
  12. echo Press Ctrl-C to abort
  13. pause
  14. echo *** Formating diskette ***
  15. if "%os%" == "Windows_NT" goto _nt
  16. format a: /u /autotest
  17. if errorlevel 1 goto _abort
  18. goto _1
  19. :_nt
  20. format a: /u /backup /v:
  21. if errorlevel 1 goto _abort
  22. :_1
  23. echo *** Making bootable diskette from (%1) ***
  24. mkbt %1\bootsect.bin a:
  25. rem MS
  26. if exist %1\io.sys copy %1\io.sys a:\
  27. if exist %1\msdos.sys copy %1\msdos.sys a:\
  28. rem non MS
  29. if exist %1\ibmbio.com copy %1\ibmbio.com a:\
  30. if exist %1\ibmdos.com copy %1\ibmdos.com a:\
  31. copy %1\command.com a:
  32. echo *** Label diskette ***
  33. label a: mkbt
  34. echo *** Flag system files to Readonly+System+Hidden ***
  35. rem MS
  36. if exist a:\io.sys attrib +r +s +h a:\io.sys
  37. if exist a:\msdos.sys attrib +r +s +h a:\msdos.sys
  38. rem non MS
  39. if exist a:\ibmbio.com attrib +r +s +h a:\ibmbio.com
  40. if exist a:\ibmdos.com attrib +r +s +h a:\ibmdos.com
  41. attrib +s +h +r a:*.sys
  42. rem
  43. rem You can add your own custom files here...
  44. rem
  45. goto _end
  46. :_err1
  47. echo Parameter required... (see readme.txt)
  48. goto _abort
  49. :_err2
  50. echo Could not find the file "%1\bootsect.bin"
  51. goto _abort
  52. :_abort
  53. echo [aborted]
  54. pause
  55. :_end
  56.